﻿using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;

namespace LaunchPad.Core.Controls
{
    /// <summary>
    /// Interaction logic for EffectControl.xaml
    /// </summary>
    public partial class EffectControl : UserControl
    {
        public EffectControl()
        {
            InitializeComponent();
            Loaded += EffectControlLoaded;
        }

        void EffectControlLoaded(object sender, RoutedEventArgs e)
        {
            groupTextBox.Focus();
        }

        public IEnumerable<Node> Nodes
        {
            get { return nodeComboBox.ItemsSource as IEnumerable<Node>; }
            set { nodeComboBox.ItemsSource = value; }
        }

        public void Commit()
        {
            effectTimelineControl.Commit();
        }
    }
}
